﻿#if !NETCOREAPP
using GameFramework.Network.MessagePack;
using GameFramework.Request;
#endif
using MessagePack;

namespace Server.Proto
{
    /// <summary>
    /// 登出通知
    /// </summary>
    [MessagePackObject(true)]
    public class KickOutNotify : Message
    {
        public const int RouteKey = (int)RouteDefine.KickOutNotify;
        
        [IgnoreMember]
        public override int Route => RouteKey;

        public enum KickOutReason
        {
            /// <summary>
            /// 重复登录
            /// </summary>
            RepeatLogin = 1,

            /// <summary>
            /// 被封号
            /// </summary>
            Ban = 2,

            /// <summary>
            /// 服务器关闭
            /// </summary>
            ServerClose = 3,
        }
        
        public KickOutReason Reason { get; set; }
    }
}